package jnpf.engine.custom.idgen;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import org.flowable.common.engine.impl.cfg.IdGenerator;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Description: 自定义Activiti主键生成器 防止 并发下 主键重复   性能问题
 * @Date:Created in 2021/12/17 13:45
 */
@Component
public class ActivitiIDWorker implements IdGenerator {
    @Override
    public String getNextId() {
        return IdWorker.getIdStr();
    }
}
